//2009/08/19 19:08:02
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class Taxi
{
public:
    double maxDis(int maxX, int maxY, int taxiDis)
    {
		double ret = -1.0;
		for(int i=0; i<=taxiDis; i++)
		{
			int x = i;
			int y = taxiDis - x;
			if(x <=maxX && y <=maxY)
			{
				double temp = sqrt(1.0*x*x + 1.0*y*y);
				if(temp > ret || ret == -1.0) ret = temp;
			}
		}
		return ret;
    }
};
